package ru.ifmo.itmokis.exceptions;

import ru.ifmo.itmokis.domain.OrderedProduct;

/**
 *
 * @author Ivan Stepuk
 */
public class NotEnoughMaterialsException extends Exception {

    private OrderedProduct cause;

    /**
     * Creates a new instance of <code>NotEnoughMaterialsException</code> without detail message.
     */
    public NotEnoughMaterialsException() {
    }

    public NotEnoughMaterialsException(OrderedProduct cause) {
        this.cause = cause;
    }

    /**
     * Constructs an instance of <code>NotEnoughMaterialsException</code> with the specified detail message.
     * @param msg the detail message.
     */
    public NotEnoughMaterialsException(String msg) {
        super(msg);
    }

    public OrderedProduct getCauseProduct() {
        return cause;
    }
}
